In many applications, there is a need to convert a digital signal that has been sampled at a first sampling rate to another digital signal sampled at a higher second sampling rate. Sample rate conversion is a computationally intensive operation that requires real-time computations involving addition and multiplication.
FIG. 1 is a block diagram of a prior art sample rate converter 100. The sample rate converter 100 converts an input signal x[n] that includes samples that are sampled at a first sample rate ƒin to an output signal y[n] sampled at a higher second sample rate ƒout. FIG. 2A is a graphical representation illustrating N=4 samples received in an input sequence of a sinusoidal signal sampled at a first sample rate ƒin.
Continuing with FIG. 1, it is assumed that the ratio of the first sample rate to the second sample rate (ƒin/ƒout) is rational and can therefore be expressed as a fraction P/Q. The conversion of the input signal x[n] to the output signal y[n] is performed by performing an up-sampling function 102 on the input signal x[n] sampled atƒin, performing a filtering (interpolation) function 104 on the up-sampled signal u[n] and then performing a down-sampling function 106 on the filtered signal v[n] to provide an output signal y[n] sampled at the new higher sampling rate ƒout.
The up-sampling function 102 up-samples by inserting P-1 zero value samples between successive samples in the input sequence x[n] to increase the sampling rate. The up-sampled sequence u[n] includes a plurality of samples of x[n] and P-1 zeros inserted between successive samples of x[n] and is given by:
      u    ⁡          [      n      ]        =      {                                        x            ⁡                          [                              n                P                            ]                                                                          n              =                              ±                mP                                      ,                          m              ∈              Z                                                            0                          otherwise                    
For example, with P=5, 4 (P-1) zero values are inserted in the up-sampled sequence u[n] between each input signal x[n] value such that, u[0] =x[0]; u[1], u[2], u[3] and u[4] =0 and u[5] =x[1]. FIG. 2B is a graphical representation illustrating P-1 zero value samples inserted between the N samples of the sinusoidal signal shown in FIG. 2A.
Continuing with FIG. 1, the up-sampled sequence u[n] is supplied to a filtering function 104. The filtering function is typically implemented as a Finite Impulse Response (FIR) filter. A Finite Impulse Response (FIR) filter has pre-defined filtering coefficients h[n] with which to perform interpolation. The filtering function is numerically intensive when converting to a higher sampling rate. To provide a filtered sequence v[n], the up-sampled sequence u[n] is passed through a series of delays, the output of each delay u[k] is multiplied by a respective coefficient h[n-k] and all the resulting products are added together.
Assuming the filtering function 104 has NP filtering coefficients h[n], the filtered sequence v[n] is given by:
      v    ⁡          [      n      ]        =            ∑              k        =                  n          -          NP          +          1                    n        ⁢                  h        ⁡                  [                      n            -            k                    ]                    ⁢              u        ⁡                  [          k          ]                    where N is the number of samples and h(n-k) are pre-stored filtering coefficients of the filter.
To regenerate the data at the desired sampling rate, the filtered signal v[n] is down-sampled to provide an output signal y[n], which only includes samples at the new sampling rate. Each filtered sample in the filtered signal v[n] is dependent on the previous NP values of up-sampled sequence u[n] input to the filter. The down-sampling operation 106 down-samples by taking every Qth sample from the up-sampled sequence v[n] to provide the output sequence y[n]. Thus, the output sequence {y[n] y[n+1] y[n+2] . . . } corresponds to {u[n] u[n+Q] u[n+2Q] . . . }. FIG. 2C is a graphical representation illustrating Q samples of the sinusoidal signal shown in FIG. 2B.
FIG. 3 is a block diagram of a prior art Finite Impulse Response (FIR) filter 104. The up-sampled sequence of samples u[n] is passed through a series of delays 300. The output of each delay 300 is multiplied by a respective pre-stored coefficient of the filter h[n-k] and the results are added in an accumulator 304. In an embodiment with the ratio of the first sample rate to the second sample rate (ƒin/ƒout) expressed as a fraction P/Q, there are 4 samples per cycle of the input sequence (N=4), 4 zero value samples (P=5) are inserted between each of the 4 samples and there are 20 (NP) taps. Thus, each filtered sample v[n] requires 20 Multiply and Accumulate (MAC) cycles and is computed as follows:v[n+0]={h[0] h[1] h[2] . . . h[19]} {u[n+0] u[n−1] u[n−2] . . . u[n−19]}
Thus, as the number of samples in the input sequence and the output sequence increases, the number of MAC cycles and taps in the filter increases accordingly. As is well known in the art of digital signal processing, there are restrictions on the sampling rate; that is, the sampling rate must be at least twice the highest frequency of the signal that is being sampled (Nyquist sampling rate), so that the sampled signal can be reconstructed without aliasing.
As the number of taps are increased, the number of Multiply-and-Accumulate (MAC) cycles to generate each successive output may make it unfeasible to compute the output sequence in real-time or with restricted hardware.